<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
<title>用户中心</title>
<link href="<%=basePath%>bootstrap-3.3.5-dist/css/bootstrap.min.css" title="" rel="stylesheet" />

<link title="" href="<%=basePath%>css/style.css" rel="stylesheet" type="text/css"  />

<link title="blue" href="<%=basePath%>css/dermadefault.css" rel="stylesheet" type="text/css"/>
<%-- <link title="green" href="<%=basePath%>css/dermagreen.css" rel="stylesheet" type="text/css" disabled="disabled"/>
<link title="orange" href="<%=basePath%>css/dermaorange.css" rel="stylesheet" type="text/css" disabled="disabled"/> --%>
<link href="<%=basePath%>css/templatecss.css" rel="stylesheet" title="" type="text/css" />


<script src="<%=basePath%>js/jquery.js" type="text/javascript"></script>
<script src="<%=basePath%>js/jquery.cookie.js" type="text/javascript"></script>
<script src="<%=basePath%>bootstrap-3.3.5-dist/js/bootstrap.min.js" type="text/javascript"></script>
<SCRIPT language=javascript src="<%=basePath%>js/jquery.ztree.all.min.js"></SCRIPT>
<SCRIPT language=javascript src="<%=basePath%>js/common.js"></SCRIPT>

<link rel="stylesheet" href="<%=basePath%>ztree/css/css/zTreeStyle/zTreeStyle.css"type="text/css">


</head>

<body>
<nav class="nav navbar-default navbar-mystyle navbar-fixed-top">
  <div class="navbar-header">
    <button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> 
     <span class="icon-bar"></span> 
     <span class="icon-bar"></span> 
     <span class="icon-bar"></span> 
    </button>
    <a class="navbar-brand mystyle-brand"><span class="glyphicon glyphicon-home"></span></a> </div>
  <div class="collapse navbar-collapse">
    <ul class="nav navbar-nav">
      <li class="li-border"><a class="mystyle-color" href="#">管理控制台</a></li>
      <li class="dropdown li-border"><a href="#" class="dropdown-toggle mystyle-color" data-toggle="dropdown">产品与服务<span class="caret"></span></a>
        <!----下拉框选项---->
         <div class="dropdown-menu topbar-nav-list">
             <div class="topbar-nav-col">
               <div class="topbar-nav-item">
               <p class="topbar-nav-item-title">弹性计算</p>
               <ul>
                 <li><a href="#">
                     <span class="glyphicon glyphicon-road"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-picture"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-gift"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                </ul>
               </div>
               
               <div class="">
               <p class="topbar-nav-item-title">弹性计算</p>
               <ul>
                 <li><a href="#">
                     <span class="glyphicon glyphicon-road"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-picture"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-gift"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
               </ul>
               </div> 
             </div>
             
             
             <div class="topbar-nav-col">
               <div class="topbar-nav-item">
               <p class="topbar-nav-item-title">弹性计算</p>
               <ul>
                 <li><a href="#">
                     <span class="glyphicon glyphicon-road"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-picture"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-gift"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                </ul>
               </div>
               
               <div class="">
               <p class="topbar-nav-item-title">弹性计算</p>
               <ul>
                 <li><a href="#">
                     <span class="glyphicon glyphicon-road"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-picture"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-gift"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
               </ul>
               </div>
               
             </div>
             
         </div>
      </li>
    </ul>
    
    <ul class="nav navbar-nav pull-right">
       <li class="li-border">
          <a href="#" class="mystyle-color">
            <span class="glyphicon glyphicon-bell"></span>
            <span class="topbar-num">0</span>
          </a>
      </li>
       <li class="li-border dropdown"><a href="#" class="mystyle-color" data-toggle="dropdown">
      <span class="glyphicon glyphicon-search"></span> 搜索</a>
         <div class="dropdown-menu search-dropdown">
            <div class="input-group">
                <input type="text" class="form-control">
                 <span class="input-group-btn">
                   <button type="button" class="btn btn-default">搜索</button>
                </span>
            </div>
         </div>
      </li>
      <li class="dropdown li-border"><a href="#" class="dropdown-toggle mystyle-color" data-toggle="dropdown">帮助与文档<span class="caret"></span></a>
        <ul class="dropdown-menu">
          <li><a href="#">帮助与文档</a></li>
          <li class="divider"></li>
          <li><a href="#">论坛</a></li>
          <li class="divider"></li>
          <li><a href="#">博客</a></li>
        </ul>
      </li>
      <li class="dropdown li-border"><a href="#" class="dropdown-toggle mystyle-color" data-toggle="dropdown"><%=session.getAttribute("username") %><span class="caret"></span></a>
        <ul class="dropdown-menu">
          <li><a href="tologin.action" >退出</a></li>
        </ul>
      </li>
     <!--  <li class="dropdown"><a href="#" class="dropdown-toggle mystyle-color" data-toggle="dropdown">换肤<span class="caret"></span></a>
        <ul class="dropdown-menu changecolor">
          <li id="blue"><a href="#">蓝色</a></li>
          <li class="divider"></li>
          <li id="green"><a href="#">绿色</a></li>
          <li class="divider"></li>
          <li id="orange"><a href="#">橙色</a></li>
        </ul>
      </li> -->
    </ul>
  </div>
</nav>
<div class="down-main">
  <div class="left-main left-full">
   <!--  <div class="sidebar-fold"><span class="glyphicon glyphicon-menu-hamburger"></span></div> -->
    
    <div class="subNavBox">
     <div class="zTreeDemoBackground left"  id="authority" style="width: auto" >  
	<ul id="user_tree" class="ztree"></ul>  
    </div>
     
    </div>
  </div>
  <div class="right-product right-full">
   <iframe id="iframe-page-content" src="<%=basePath%>index.action" width="100%"  frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"></iframe>
  </div>
  
  <form action="" >
  <input type="hidden" id="id" value="${name }">
  </form>
</div>
<script type="text/javascript">
$(function() {
	var height=document.documentElement.clientHeight-50;
	document.getElementById('iframe-page-content').style.height=height+'px';
});

var zTree;  
$(document).ready(function(){
	var set = {
		    view: {  
		        dblClickExpand: true,//双击节点时，是否自动展开父节点的标识  
		        showLine: true,//是否显示节点之间的连线  
		        fontCss:{'color':'red','font-weight':'bold'},//字体样式函数  
		        selectedMulti: true //设置是否允许同时选中多个节点  
		    },  
			
			   data: {  
			        simpleData: {//简单数据模式  
			            enable:true,  
			            idKey: "id",  
			            pIdKey: "pid",  
			            rootPId: ""  
			        }  
			    },
			    callback: {  
			        onClick: function(e,treeId, treeNode) {
			        var url=sy.bp()+treeNode.src;
			        $("#iframe-page-content").attr('src',url);
			        }
			    }
	};
var zNodes =[
{id:4, pid:0, name:"人员信息", src:"/message/index.action",open:false, nocheck:true},
{id:5, pid:0, name:"酒类信息", src:"/message/index.action",open:false, nocheck:true},
{id:41, pid:4, name:"用户管理",src:"/user/user1.action", open:false, nocheck:true},
{id:51, pid:5, name:"酒类型",src:"/message/index.action", open:false, nocheck:true},
{id:52, pid:5, name:"酒厂",src:"/message/index.action", open:false, nocheck:true},
{id:53, pid:5, name:"酒产品",src:"/message/index.action", open:false, nocheck:true},
{id:42, pid:4, name:"角色管理", src:"/role/role1.action",open:false, nocheck:true}];

	$.ajax({
		url :sy.bp()+"/ztree/findUserSyauthority.action",
		type:"post",
		
		dataType : "json",
		success : function(a) {
			t = $.fn.zTree.init($("#user_tree"), set, a); 
			var treeObj = $.fn.zTree.getZTreeObj("user_tree");
			treeObj.expandAll(true);
			
			console.info(a);
		}
	}); 
});

</script>
</body>
</html>
